package com.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.entity.User;
import com.mapper.UserMapper;
import com.service.UserService;

@Service
public class UserServiceImpl implements UserService {
	@Resource
	private UserMapper userMapper;
	
	public User login(String userName, String userPass) {
		return userMapper.login(userName, userPass);
	}

	public void addUser(User user) {
		userMapper.addUser(user);
		
	}

	public List<User> listUser() {
		return userMapper.listUser();
	}

	
	public User getUserById(Integer id) {
		return userMapper.getUserById(id);
	}

	
	public void updateUser(User user) {
		userMapper.updateUser(user);
	}

	@Override
	public void deleteUser(Integer id) {
		userMapper.deleteUser(id);
		
	}

}


























